conversionTable = {'int': int,
 'float': float,
 'str': str,
 'unicode': unicode}

class ConvertVariableException(Exception):


def CastValue(type, value):
    if (type in conversionTable):
        return conversionTable[type](value)
    raise ConvertVariableException, ('Unknown conversion type -%s-' % type)


exports = {'util.CastValue': CastValue}

